DATA SEGMENT
	LENA EQU 15
	LENB EQU 20
	A DW LENA DUP(0)
	B DW LENB DUP(0)
	C DW LENB DUP(0)
DATA ENDS

STACK SEGMENT STACK
    DW 100H DUP(0)
STACK ENDS

CODE SEGMENT
	ASSUME CS:CODE, DS:DATA, SS:STACK
START:
	MOV AX, DATA
	MOV DS, AX
    MOV AX, STACK
    MOV SS, AX

	MOV CX, LENA
	MOV SI, OFFSET A
	MOV DI, OFFSET B
	MOV BX, OFFSET C		
LOOP_1:
	PUSH CX			
	
	MOV AX, [SI]					
	MOV CX, LENB
	MOV DI, OFFSET B
	LOOP_2:
		CMP AX, [DI]	
		JZ EQUAL		
		ADD DI, 2		
	LOOP LOOP_2
	JMP CONTINUE
EQUAL:
	MOV [BX], AX
	ADD BX, 2
CONTINUE:	
	POP CX
	ADD SI, 2
LOOP LOOP_1


	MOV AX, 4CH
	INT 21H
CODE ENDS
	END START